<template>
  <div class="category">
    <h3>{{ title }}列表</h3>
    <slot
        :games="games"
        :films="films"
        :foods="foods"
    >我是插槽默认值，当没有内容传递给我时我会被展示...</slot><!--使用类似props的传值语法-->
  </div>
</template>

<script>
export default {
  name: "Categroy",
  props:['title'],
  data(){
    return{
      foods:['火锅','烧烤','小龙虾','牛排'],
      films:['《老师，好！》','《救世主》','《拆弹专家》','《我是特种兵》'],
      games:['超级玛丽','血战上海滩','七龙珠','赛尔号']
    }
  }
}
</script>

<style scoped>
  .category{
    background-color: skyblue;
    width: 200px;
    height: 300px;
  }
  h3{
    text-align: center;
    background-color: orange;
  }
</style>